home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…tion Library 2 (Reseller) / Apple R&P Lib Reseller v2.0.iso / 4-Fonts & Software / Demo Software / AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmpC_202_Globals.txt < prev    next >
Text File  |  1989-04-09  |  2KB  |  2 lines

  1. # (decoded with TMPL 13671)
  2. /* %filename% *//* Created %date% %time% by AppMaker */%If MPW%#include <Types.h>#include <Quickdraw.h>#include <Controls.h>#include <Dialogs.h>#include <Events.h>#include <Lists.h>#include <Menus.h>#include <TextEdit.h>%end if%#include "%unitname%.h"#define nil        0L/*Standard vars:*/Boolean            quittingTime;                             EventRecord        curEvent;                          WindowPtr        curWindow;WinInfoPtr        cur;Boolean            inBackground;WinInfoRec        noCur;%If MPW%#pragma segment %unitname%%end if% /*----------*/void InitGlobals (){    curWindow = nil;    noCur.text = nil;    noCur.vScroll = nil;    noCur.hScroll = nil;    noCur.fileNum = 0;    noCur.volNum = 0;    noCur.dirty = false;    noCur.windowKind = noWindow;    cur = &noCur;} /*InitGlobals*//*----------*/void SetInfo (window)WindowPtr        window;{    WinInfoPtr        infoPtr;    if (window != curWindow) {        curWindow = window;        if (curWindow != nil) {            infoPtr = (WinInfoPtr) GetWRefCon (curWindow);            cur = infoPtr;        } else {            cur = &noCur;        } /*if*/    } /*if*/} /*SetInfo*//*----------*/void SetNewInfo (window)WindowPtr        window;{    WinInfoPtr        infoPtr;    infoPtr = (WinInfoPtr) NewPtr (sizeof (WinInfoRec));    SetWRefCon (window, (long) infoPtr);    SetInfo (window);} /*SetNewInfo*//*----------*/void DiscardInfo (window)WindowPtr        window;{    WinInfoPtr        infoPtr;    if (window == curWindow) {        SetInfo (nil);    }    infoPtr = (WinInfoPtr) GetWRefCon (window);    DisposPtr ((Ptr) infoPtr);    HideWindow (window);    DisposeWindow (window);} /*DiscardInfo*/